package com.liao.badminton.vo;

import com.liao.badminton.code.BaseField;
import io.swagger.annotations.ApiModelProperty;

import java.lang.String;
import java.math.BigDecimal;
import java.util.List;

import lombok.Data;
import com.liao.badminton.entity.ActivityParticipator;

/**
 * @author liaocheng
 * @date 2024-11-15
 * description:活动参与者表
 */
@Data
public class ActivityParticipatorVo extends BaseField {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "id")
    private Long activityId;

    @ApiModelProperty(value = "用户和群id")
    private Long userGroupRefId;

    @ApiModelProperty(value = "活动文本内容")
    private String txtContent;
    @ApiModelProperty(value = "是否免费：0否，1是")
    private Integer FeeCharge;
    @ApiModelProperty(value = "是否半价：0否，1是")
    private Integer halfFlag;
    @ApiModelProperty(value = "是否飞机：0否，1是")
    private Integer onlySite;
    @ApiModelProperty(value = "费用")
    private BigDecimal cost;

    private List<Long> delIds;  //批量删除ids
    @ApiModelProperty(value = "用户名称")
    private String userName;
    @ApiModelProperty(value = "用户性别")
    private Integer sex;
    @ApiModelProperty(value = "排序")
    private Integer sortNum;

    public static ActivityParticipatorVo invertToVo(ActivityParticipator activityParticipator) {
        ActivityParticipatorVo vo = new ActivityParticipatorVo();
        BaseField.invert(activityParticipator, vo);
        vo.setId(activityParticipator.getId());
        vo.setActivityId(activityParticipator.getActivityId());
        vo.setUserGroupRefId(activityParticipator.getUserGroupRefId());
        vo.setTxtContent(activityParticipator.getTxtContent());
        vo.setFeeCharge(activityParticipator.getFeeCharge());
        vo.setHalfFlag(activityParticipator.getHalfFlag());
        vo.setOnlySite(activityParticipator.getOnlySite());
        vo.setCost(activityParticipator.getCost());
        vo.setSortNum(activityParticipator.getSortNum());
        return vo;
    }
}
